package com.array;

import java.util.Arrays;
import java.util.Date;

public class String2CharArray {
	public static void main(String[] args){
		String str="QWERTtyuiopasfdghjklzcvbnmm";
		print(str);
		char [] src=str.toCharArray();
		System.out.println("");
		for(int i=0;i<str.length();i++)
		{
			System.out.print(src[i]+"["+i+"]"+",");
		}
		Arrays.sort(src);
		System.out.println("");
		for(int i=0;i<str.length();i++)
		{
			System.out.print(src[i]+"["+i+"]"+",");
		}
		int loc=Arrays.binarySearch(src, 'm');
		System.out.println("");
		System.out.print(loc);		
	}

	private static void print(Object obj) {
		Date date=new Date();
		System.out.print(date+": "+obj);
		
	}

	
}
